<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
    	<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>众筹管理后台</title>
		<link rel="stylesheet" href="${pageContext.request.contextPath }/admin/css/bootstrap.min.css" />
		<link rel="stylesheet" href="${pageContext.request.contextPath }/admin/css/dashboard.css" />
	</head>
	<body>
		
		 <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">众筹管理平台</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
        	
          <ul class="nav navbar-nav navbar-right">
          	<li><a href="index.html">首页</a></li>
          	<li><a href="#">欢迎, 张三</a></li>
            <li><a href="#" title="修改个人资料和密码的页面">设置</a></li>
            <li><a href="#" title="退出登录">退出</a></li>
          </ul>
        </div>
      </div>
    </nav>

    <div class="container-fluid">
      <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
        	<ul class="nav nav-sidebar">
            <li ><a href="${pageContext.request.contextPath }/admin/index.html">首页</a></li>
           </ul>
         <ul class="nav nav-sidebar">
            <li><a href="${pageContext.request.contextPath}/project/list">所有项目*</a></li>
            <li><a href="${pageContext.request.contextPath}/check/list">项目审核</a></li>
            <li><a href="#">项目跟踪</a></li>
            <li><a href="#">项目评论</a></li>
            <li><a href="${pageContext.request.contextPath}/classity/list">项目分类*</a></li>
            <li><a href="#">项目推荐</a></li>
          </ul>
          <ul class="nav nav-sidebar">
            <li class="active"><a href="${pageContext.request.contextPath }/front/user/list">注册用户</a></li>
            <li><a href="">用户资金</a></li>
            <li><a href="${pageContext.request.contextPath }/front/user/log">用户日志</a></li>
            <li><a href="${pageContext.request.contextPath }/front/user/check">实名审核</a></li>
          </ul>
          <ul class="nav nav-sidebar">
            <li><a href="">新闻管理</a></li>
            <li><a href="">问题管理</a></li>
            <li><a href="${pageContext.request.contextPath }/background/user/list">管理用户</a></li>
            <li><a href="${pageContext.request.contextPath }/background/user/log">管理日志</a></li>
          </ul>
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
          <h1 class="page-header">用户注册</h1>

		<div class="panel panel-default">
<div class="panel-body">
		<form class="form-inline" action="${pageContext.request.contextPath }/front/user/list">
		<table class="table table-bordered table-hover definewidth m10">
			<tr>
				<td width="10%" class="tableleft">用户名：</td>
				<td><input type="text" name="username" value="${map.username }" /></td>
	
				<td width="10%" class="tableleft">用户电话：</td>
				<td><input type="text" name="userphone" value="${map.userphone }" /></td>
	
				<td width="10%" class="tableleft">审核状态：</td>
				<td>
				<select name="userstatus" class=form-control>
					<option value=""  ${map.userstatus==''?'selected':'' }>审核状态</option>	
					<option value="0" ${map.userstatus==0?'selected':'' }>未实名制</option>
					<option value="1" ${map.userstatus==1?'selected':'' }>审核中</option>
					<option value="2" ${map.userstatus==2?'selected':'' }>审核成功</option>
				</select>
				</td>&nbsp;&nbsp;
				<td><button type="submit" class="btn btn-default btn-primary">查询</button></td>
			</tr>
	          </table>
		</form>
	</div>
   </div>
			<div class="panel panel-default">
  <div class="panel-heading">
    <div class="panel-title">
    	所有用户列表
    </div>
  </div>
  <div class="panel-body">
   
          <div class="table-responsive ">
            <table class="table table-striped table-bordered">
              <thead>
                <tr>
                  <th>序号</th>
                  <th>用户名</th>
                  <th>用户电话</th>
                  <th>真实姓名</th>
                  <th>身份证号</th>
                  <th>实名制状态</th>
                  <th>操作</th>
                </tr>
              </thead>
              <c:forEach var="l" items="${user }">
              <tbody>
                <tr>
                  <td>${l.id }</td>
                  <td>${l.name }</td>
                  <td>${l.ipone }</td>
                  <td>${l.rName }</td>
                  <td>${l.idNum }</td>
                  <td>
                  	<c:choose>
                  		<c:when test="${l.uStatus==0 }">
                  			未实名
                  		</c:when>
                  		<c:when test="${l.uStatus==1 }">
                  			正在审核
                  		</c:when>
                  		<c:otherwise>
                  			审核通过
                  		</c:otherwise>
                  	</c:choose>
                  </td>
                  <td>
                  	<a href="${pageContext.request.contextPath }/front/user/update?id=${l.id}">编辑</a>
                  	<a href="${pageContext.request.contextPath }/front/user/delete?id=${l.id}">删除</a>
                  </td>
                </tr>
              </tbody>
              </c:forEach>
            </table>
          </div>

  	             <nav aria-label="Page navigation" class="text-right">
				  <ul class="pagination">
				    <li class="disabled">
				      <a href="${pageContext.request.contextPath }/front/user/list?username=${map.username}&userphone=${map.userphone}&userstatus=${map.userstatus}&pageNo=${page.prePage }" aria-label="Previous">
				        <span aria-hidden="true">&laquo;</span>
				      </a>
				    </li>
				    <li>
				    <c:forEach var="i" begin="1" end="${page.pages }" step="1">
			          <a href='${pageContext.request.contextPath }/front/user/list?username=${map.username}&userphone=${map.userphone}&userstatus=${map.userstatus}&pageNo=${i}'>${i }</a>
			         </c:forEach>
			         </li>
				    <li>
				      <a href="${pageContext.request.contextPath }/front/user/list?username=${map.username}&userphone=${map.userphone}&userstatus=${map.userstatus}&pageNo=${page.nextPage}" aria-label="Next">
				        <span aria-hidden="true">&raquo;</span>
				      </a>
				    </li>
				&nbsp;&nbsp;&nbsp;共<span class='current'>${page.total }</span>条记录<span class='current'> ${page.pageNum }/${page.pages } </span>页  	
				  </ul>
				</nav> 
  </div>
 

</div>
      
        </div>
      </div>
    </div>
		
		<script type="text/javascript" src="js/jquery1.12.4.min.js" ></script>
		<script type="text/javascript" src="js/bootstrap.min.js" ></script>
		<script type="text/javascript" src="js/countUp.js" ></script>
		<script>
			$(document).ready(function() {
				
			});
		</script>
	</body>
</html>